package org.cshoo.sys.command
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import mx.collections.ArrayCollection;
	import mx.rpc.IResponder;
	import mx.rpc.events.ResultEvent;
	
	import org.cshoo.sys.business.MenuDelegate;
	import org.cshoo.sys.event.FindMenuListByParentEvent;
	import org.cshoo.sys.model.SysModelLocator;
	import org.cshoo.sys.model.vo.Menu;
	
	public class FindMenuListByParentCommand implements ICommand, IResponder
	{
		private　var　_model:SysModelLocator = SysModelLocator.getInstance();
		
		public function execute(event:CairngormEvent):void
		{
			var menuParent:Menu = (event as FindMenuListByParentEvent).menuParent;
			var menuDelegate:MenuDelegate = new MenuDelegate(this);
			menuDelegate.findMenuListByParent(menuParent);
		}
		
		public function result(event:Object):void
		{
//			var collection:ArrayCollection = (event as ResultEvent).result as ArrayCollection;
//			_model.menuCollection = collection;
		}
		
		public function fault(info:Object):void
		{
			trace(info);
		}
	}
}